﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using Microsoft.Practices.Composite.Events;
using Microsoft.Practices.Composite.Presentation.Events;


namespace EQual.MainModule.MainNavigation
{
    /// <summary>
    /// Interaction logic for OutlookTabControl.xaml
    /// </summary>
    public partial class OutlookTabControl : UserControl , INavigationView 
    {
        public ItemsControl DocumentsControlProcces
        {
            get { return this.documentstreeview; }
        }

        IMainNavigationController controller;

        public  IMainNavigationController Controller
        {
            get { return controller; }
            set { controller = value; }
        }
         
        public OutlookTabControl()
        {
            InitializeComponent();

        }

        #region INavigationView Members

        public void SetUpNavigationList(IEnumerable<string> navigations)
        {

        }

        #endregion

        public ItemsControl NavigationControl
        {
            get { return this.MainOutlookControl; }
        }

        #region INavigationView Members

        /// <summary>
        /// 
        /// </summary>
        /// <param name="token"></param>
        ///for this control the modules add a new tab and a treeView in the tab 
        ///finaly must add a new tab and onselection sould be able to fill the tab[contentRegion] with any view
        ///the module needs not needed to be treelist 
        public void AddNewModule(EQual.Infrastructure.ModuleToken token)
        {
            //Add new Tab 

            //Add new TreeView 

        }

        #endregion

        #region INavigationView Members


        public ItemsControl EmployeeProcces
        {
            get { return this.personeltreeview; }
        }

        #endregion

        private void Ttreeview_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            Controller.NewItemSelected(e.NewValue);
        }

        #region INavigationView Members


        public ItemsControl ProjectsProcces
        {
            get {return this.projectsTreeView; }
        }

        #endregion

        #region INavigationView Members


        public ItemsControl FailluresProcces
        {
            get { return this.failuresTreeView; }
        }

        #endregion
    }
}
